Prediction method for decoding and apparatus, and computer storage medium

ABSTRACT

A prediction method, apparatus, and a computer storage medium for decoding, the method includes: acquiring reference samples adjacent to at least one side of a decoding block; determining a reference point from the at least one side and determining reference sample positions to be selected corresponding to the at least one side according to a preset number of samples; selecting reference samples corresponding to the reference sample positions to be selected from the reference samples based on the reference sample positions to be selected; and performing prediction decoding on the decoding block based on the selected reference samples.

CROSS-REFERENCE TO RELATED APPLICATION

This is a continuation application of U.S. application Ser. No.17/234,639, filed Apr. 19, 2021, which is a continuation application ofInternational Application No. PCT/CN2018/123657 filed on Dec. 25, 2018,the contents of which are hereby incorporated by reference in theirentirety.

TECHNICAL FIELD

Embodiments of the disclosure relate to the technical field of videocoding and decoding, and particularly to a prediction method fordecoding and device and a computer storage medium.

BACKGROUND

With the increase of requirements on video display quality, novel videoapplication forms such as high-definition and ultra-high-definitionvideos have emerged. H.265/High Efficiency Video Coding (HEVC) is thelatest international video compression standard at present. Comparedwith that of a previous-generation video coding standard H.264/AdvancedVideo Coding (AVC), the compression performance of H.265/HEVC isimproved by about 50% but still cannot meet a rapid developmentrequirement of video applications, particularly novel video applicationssuch as ultra-high-definition and Virtual Reality (VR) videos.

The video coding experts group of the International TelecommunicationUnion Telecommunication Standardization Sector (ITU-T) and the motionpicture experts group of the International Standardization Organization(ISO)/International Electrotechnical Communication (IEC) set up theJoint Video Exploration Team (JVET) in 2015 to develop a next-generationvideo coding standard. A Joint Exploration Test Model (JEM) is auniversal reference software platform, and verification of differentcoding tools is implemented based on this platform. The next-generationvideo coding standard was named formally by the JVET as Versatile VideoCoding (VVC) in April, 2018, and a corresponding test model is a ViewTransformation Model (VTM). A prediction method for encoding anddecoding based on a linear model has been integrated in the referencesoftware JEM and VTM, and through the linear model, a chroma componentof a current decoding block is predicted according to a luma componentthereof. However, when the linear model is constructed, a subset ofneighbouring reference samples formed by the neighbouring referencesamples is not so reasonable, which makes the search complexityrelatively high and reduces the video picture decoding predictionperformance.

SUMMARY

In view of this, the embodiments of the disclosure provide a predictionmethod for decoding and device and a computer storage medium. Bothimportance and dispersion are considered for neighbouring referencesamples in a subset of the neighbouring reference samples, and thesubset of the neighbouring reference samples includes few samples, sothat the search complexity is reduced, the video picture decodingprediction performance is improved, and the bit rate is further reduced.

The technical solutions of the embodiments of the disclosure may beimplemented as follows.

According to a first aspect, the embodiments of the disclosure provide aprediction method for decoding, which may include the followingoperations.

Reference samples adjacent to at least one side of a decoding block areacquired to obtain a first set of neighbouring reference samples.

A reference point is determined from the at least one side, andreference sample positions to be selected corresponding to the at leastone side are determined according to a preset number of samples.

Reference samples corresponding to the reference sample positions to beselected are selected from the first set of the neighbouring referencesamples based on the reference sample positions to be selected, and theselected reference samples form a subset of the neighbouring referencesamples.

Prediction decoding is performed on the decoding block based on thesubset of the neighbouring reference samples.

According to a second aspect, the embodiments of the disclosure providea prediction device for decoding, which may include an acquisition unit,a determination unit, a selection unit and a decoding unit.

The acquisition unit may be configured to acquire reference samplesadjacent to at least one side of a decoding block to obtain a first setof neighbouring reference samples.

The determination unit may be configured to determine a reference pointfrom the at least one side and determine reference sample positions tobe selected corresponding to the at least one side according to a presetnumber of samples.

The selection unit may be configured to select reference samplescorresponding to the reference sample positions to be selected from thefirst set of the neighbouring reference samples based on the referencesample positions to be selected and form a subset of the neighbouringreference samples using the selected reference samples.

The decoding unit may be configured to perform prediction decoding onthe decoding block based on the subset of the neighbouring referencesamples.

According to a third aspect, the embodiments of the disclosure provide aprediction device for decoding, which may include a memory and aprocessor.

The memory may be configured to store a computer program capable ofrunning in the processor.

The processor may be configured to run the computer program to executeoperations of the method as described in the first aspect.

According to a fourth aspect, the embodiments of the disclosure providea computer storage medium, which may store a decoding predictionprogram. The decoding prediction program may be executed by at least oneprocessor to implement operations of the method as described in thefirst aspect.

The embodiments of the disclosure provide a prediction method fordecoding and device and a computer storage medium. Reference samplesadjacent to the at least one side of the decoding block are acquired atfirst to obtain the first set of neighbouring reference samples. Then, areference point is determined from the at least one side, and referencesample positions to be selected corresponding to the at least one sideare determined according to the preset number of samples. Next,reference samples corresponding to the reference sample positions to beselected are selected from the first set of neighbouring referencesamples based on the reference sample positions to be selected, and theselected reference samples form the subset of the neighbouring referencesamples. Finally, prediction decoding is performed on the decoding blockbased on the subset of the neighbouring reference samples. Bothimportance and dispersion are considered for selection of neighbouringreference samples in the subset of the neighbouring reference samples,so that model parameters constructed based on the subset of theneighbouring reference samples are relatively accurate, and the videopicture decoding prediction performance may be improved. Moreover, thesubset of the neighbouring reference samples includes few samples, sothat the search complexity is also reduced, the video picture decodingprediction performance is improved and the bit rate is further reduced.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A to FIG. 1C are schematic structure diagrams of video picturesample formats in a related technical solution respectively.

FIG. 2A and FIG. 2B are schematic sampling diagrams of first colourcomponent neighbouring reference values and second colour componentneighbouring reference values of a decoding block in the relatedtechnical solution respectively.

FIG. 3 is a schematic structure diagram of constructing a predictionmodel based on maximums and minimums of a decoding block in the relatedtechnical solution.

FIG. 4A and FIG. 4B are schematic structure diagrams of selectingneighbouring reference samples for a square decoding block and anon-square decoding block according to the related technical solutionrespectively.

FIG. 5A and FIG. 5B are schematic structure diagrams of selectingneighbouring reference samples according to a conventional technicalsolution and an L0138 proposal in the related technical solutionrespectively.

FIG. 6 is a schematic block diagram of a video coding system accordingto an embodiment of the disclosure.

FIG. 7 is a schematic block diagram of a video decoding system accordingto an embodiment of the disclosure.

FIG. 8 is a schematic flowchart of a prediction method for decodingaccording to an embodiment of the disclosure.

FIG. 9 is a schematic structure diagram of selecting a subset of theneighbouring reference samples corresponding to an upper side of adecoding block according to an embodiment of the disclosure.

FIG. 10 is a schematic structure diagram of selecting a subset of theneighbouring reference samples corresponding to a left side of adecoding block according to an embodiment of the disclosure.

FIG. 11 is another schematic structure diagram of selecting a subset ofthe neighbouring reference samples corresponding to an upper side of adecoding block according to an embodiment of the disclosure.

FIG. 12 is another schematic structure diagram of selecting a subset ofthe neighbouring reference samples corresponding to an upper side of adecoding block according to an embodiment of the disclosure.

FIG. 13 is another schematic structure diagram of selecting a subset ofthe neighbouring reference samples corresponding to an upper side of adecoding block according to an embodiment of the disclosure.

FIG. 14 is another schematic structure diagram of selecting a subset ofthe neighbouring reference samples corresponding to an upper side of adecoding block according to an embodiment of the disclosure.

FIG. 15 is a schematic structure diagram of a prediction device fordecoding according to an embodiment of the disclosure.

FIG. 16 is a schematic hardware structure diagram of a prediction devicefor decoding according to an embodiment of the disclosure.

DETAILED DESCRIPTION

In order to facilitate understanding of the characteristics andtechnical contents of the embodiments of the disclosure, implementationof the embodiments of the disclosure will be described below incombination with the drawings in detail. The appended drawings are onlyadopted for description as references and not intended to limit theembodiments of the disclosure.

In a video picture, a first colour component, a second colour componentand a third colour component are usually adopted to represent decodingblocks. The three colour components are a luma component, a blue chromacomponent and a red chroma component respectively. Specifically, theluma component is usually represented by a sign Y, the blue chromacomponent is usually represented by a sign Cb, and the red chromacomponent is usually represented by a sign Cr.

In the embodiments of the disclosure, the first colour component may bethe luma component Y, the second colour component may be the blue chromacomponent Cb, and the third colour component may be the red chromacomponent Cr. However, no specific limits are made thereto in theembodiments of the disclosure. At present, the common sample format isYCbCr format. The YCbCr format includes the formats as illustrated inFIG. 1A to FIG. 1C respectively. In the figures, the cross (X)represents a sample point of the first colour component, and the circle(O) represents a sample point of the second colour component or thethird colour component. The YCbCr format includes the following formats.

A 4:4:4 format: as illustrated in FIG. 1A, the second colour componentor the third colour component is not down-sampled. Four samples of thefirst colour component, four samples of the second colour component andfour samples of the third colour component are extracted from every fourcontinuous samples in each scan line.

A 4:2:2 format: as illustrated in FIG. 1B, 2:1 horizontal sampling isperformed on the first colour component relative to the second colourcomponent or the third colour component, and vertical down-sampling isnot performed. Four samples of the first colour component, two samplesof the second colour component and two samples of the third colourcomponent are extracted from every four continuous samples in each scanline.

A 4:2:0 format: as illustrated in FIG. 1C, 2:1 horizontal down-samplingand 2:1 vertical down-sampling are performed on the first colourcomponent relative to the second colour component or the third colourcomponent. Two samples of the first colour component, one sample of thesecond colour component and one sample of the third colour component areextracted from every two continuous samples in a horizontal scan lineand a vertical scan line.

Under the condition that the 4:2:0 YCbCr format is adopted for a videopicture, if a first colour component of the video picture is a decodingblock with a size of 2N×2N, a corresponding second colour component orthird colour component is a decoding block with a size of N×N, where Nis a side length of the decoding block. In the embodiments of thedisclosure, the following descriptions are made with the 4:2:0 format asan example. However, the technical solutions of the embodiments of thedisclosure are also applied to other sample formats.

In the next-generation video coding standard H.266, for furtherimproving the encoding and decoding performance, Cross-ComponentPrediction (CCP) is extended and improved, and Cross-Component LinearModel Prediction (CCLM) is proposed. In H.266, CCLM implementsprediction from the first colour component to the second colourcomponent, from the first colour component to the third colour componentand between the second colour component and the third colour component.The following descriptions are made with prediction from the firstcolour component to the second colour component as an example, but thetechnical solutions of the embodiments of the disclosure may also beapplied to prediction of other colour components.

It can be understood that, for reducing a redundancy between the firstcolour component and the second colour component, a CCLM prediction modeis adopted for a VTM. In such case, the first colour component and thesecond colour component are the same decoding block, and the secondcolour component is predicted based on a first colour componentreconstructed value of the same decoding block. For example, aprediction model in a formula (1) is adopted:Pred_(c)[i,j]=α·Rec_(L)[i,j]+β  (1).

i, j represents a position coordinate of a sample in the decoding block,i representing a horizontal direction and j representing a verticaldirection, Pred_(c)[i, j] represents a second colour component predictedvalue corresponding to the sample with the position coordinate [i, j] inthe decoding block, Rec_(L)[i, j] represents a first colour componentreconstructed value corresponding to the sample with the positioncoordinate [i, j] in the same decoding block (after down-sampling), andα and β are model parameters of the prediction model.

There are many manners for constructing the model parameters α and β. Aleast-square evaluation-based regression construction manner may beadopted, or a maximum and minimum-based construction manner may beadopted, or even another construction manner may be adopted. No specificlimits are made thereto in the embodiments of the disclosure. Thefollowing descriptions are made with the least square evaluation-basedregression construction manner and the maximum and minimum-basedconstruction manner as examples respectively.

In VVC, a method for deriving model parameters of the least-square-basedregression construction is initially accepted. Specifically, α and β inthe following formula (2) may be deduced by minimizing regression errorsof first colour component neighbouring reference values and secondcolour component neighbouring reference values around a decoding block:

$\begin{matrix}\left\{ {\begin{matrix}{\alpha = \frac{{2{N \cdot {\sum\left( {{L(n)} \cdot {C(n)}} \right)}}} - {\sum{{L(n)} \cdot {\sum{C(n)}}}}}{{2{N \cdot {\sum\left( {{L(n)} \cdot {L(n)}} \right)}}} - {\sum{{L(n)} \cdot {\sum{L(n)}}}}}} \\{\beta = \frac{{\sum{C(n)}} - {\alpha \cdot {\sum{L(n)}}}}{2N}}\end{matrix}.} \right. & (2)\end{matrix}$

L(n) represents the first colour component neighbouring reference valuecorresponding to a left side and upper side after down-sampling, C(n)represents the second colour component neighbouring reference valuecorresponding to the left side and the upper side, N is the side lengthof the second colour component decoding block, and n=1, 2, . . . , 2N.FIG. 2A and FIG. 2B illustrate sampling diagrams of neighbouringreference values of the first colour component and neighbouringreference values of the second colour component of a decoding block inthe related technical solution respectively. In FIG. 2A, the large boldblock is adopted to highlight a first colour component decoding block21, and the gray solid circle is adopted to indicate a neighbouringreference value L(n) of the first colour component decoding block 21. InFIG. 2B, the large bold block is adopted to highlight a second colourcomponent decoding block 22, and the gray solid circle is adopted toindicate a neighbouring reference value C(n) of the second colourcomponent decoding block 22. FIG. 2A illustrates the first colourcomponent decoding block 21 with a size of 2N×2N. For a video picture ina 4:2:0 format, a size of a second colour component corresponding to afirst colour component with the size of 2N×2N is N×N, as illustrated by22 in FIG. 2B. That is, FIG. 2A and FIG. 2B are schematic diagrams ofdecoding blocks obtained by performing first colour component samplingand second colour component sampling on the same decoding block.

In VVC, a simplified method for deriving model parameters is acceptedrecently. Specifically, a maximum first colour component neighbouringreference value and a minimum first colour component neighbouringreference value may be searched to deduce the model parameters α and βin the following formula (3) according to the principle that “two pointsdetermine a line”:

$\begin{matrix}{\left\{ \begin{matrix}{\alpha = \frac{L_{\max} - L_{\min}}{C_{\max} - C_{\min}}} \\{\beta = {L_{\min} - {x \cdot C_{\min}}}}\end{matrix} \right..} & (3)\end{matrix}$

L_(max) and L_(min) represent the maximum and minimum obtained bysearching the first colour component neighbouring reference valuescorresponding to the left side and the upper side after down-sampling,and C_(max) and C_(min) represent second colour component neighbouringreference values corresponding to reference samples at positionscorresponding to L_(max) and L_(min). FIG. 3 illustrates a structurediagram of constructing a prediction model based on maximums andminimums of a decoding block in the related technical solution. Theabscissa represents neighbouring reference values of the first colourcomponent of the decoding block, and the ordinate representsneighbouring reference values of the second colour component of thedecoding block. The model parameters α and β may be calculated throughthe formula (3) according to L_(max), L_(min), C_(max) and C_(min), anda constructed prediction model is C=α·L+β. Here, L represents a firstcolour component reconstructed value corresponding to a sample in thedecoding block, and C represents a second colour component predictedvalue corresponding to the sample in the decoding block.

For construction of a set of neighbouring reference samples in CCLM,there are many conditions in the conventional art, which will bedescribed below respectively.

(a) Distinguishing from the Shape of the Decoding Block

FIG. 4A illustrates a structure diagram of selecting neighbouringreference samples for a square decoding block according to the relatedtechnical solution. As illustrated in FIG. 4A, the decoding block is asquare decoding block, and all neighbouring samples corresponding to aleft side and upper side of the decoding block may be determined asreference samples. For a first colour component, down-sampling isrequired to be performed at first such that the down-sampled firstcolour component has the same resolution as a second colour component.In FIG. 4A, the gray solid circle is adopted to represent theneighbouring reference sample selected for the square decoding block.

FIG. 4B illustrates a structure diagram of selecting neighbouringreference samples for a non-square decoding block according to therelated technical solution. As illustrated in FIG. 4B, the decodingblock is a non-square decoding block, and a width and height of thedecoding block are unequal. On one hand, down-sampling on a first colourcomponent is required to be performed at first such that thedown-sampled first colour component has the same resolution as a secondcolour component. On the other hand, neighbouring samples correspondingto a long side of the decoding block are required to be furtherdown-sampled such that the number of neighbouring reference samplesobtained for the long side is equal to the number of neighbouringreference samples corresponding to a short side. In FIG. 4B, the graysolid circle represents the neighbouring reference sample selected forthe non-square decoding block.

(b) Distinguishing from Existence of Neighbouring Samples Correspondingto the Left Side or Upper Side of the Decoding Block.

When neighbouring samples corresponding to the left side and upper sideof the decoding block are available, all the samples in a row adjacentto the upper side and the neighbouring samples in a column adjacent tothe left side may be determined as neighbouring reference samples.

When neighbouring samples corresponding to only one of the left side andupper side of the decoding block are available, the neighbouring samplescorresponding to the available side are determined as neighbouringreference samples.

When all the neighbouring samples corresponding to the left side andupper side of the decoding block are unavailable, there is noneighbouring reference sample, the model parameter α is set to be 0, andthe model parameter β is set to be an intermediate value 512 of thesecond colour component, namely second colour component predicted valuescorresponding to all samples in the decoding block are 512.

It is to be noted that, if N is defined as a length of the short side ofthe second colour component decoding block, when all the neighbouringsamples corresponding to the left side and upper side of the decodingblock are available, there are totally 2N neighbouring reference samplesavailable for CCLM. In addition, unless otherwise specified, thefollowing descriptions are made with the condition that all theneighbouring samples corresponding to the left side and upper side ofthe decoding block are available as an example.

(c) Scheme of a Subset of the Neighbouring Reference Samples (Samplesare Reduced)

In a process of calculating the model parameter for CCLM, the requiredoperation complexity is directly proportional to the number ofneighbouring reference samples for CCLM. Therefore, for reducing theoperation complexity, the L0138 proposal in the twelfth meeting of theJVET proposes a technical scheme of reducing the number of neighbouringreference samples for CCLM based on a size of a second colour componentblock corresponding to a decoding block. Table 1 illustrates arelationship table between a size of a second colour component blockcorresponding to a decoding block and the number of neighbouringreference samples according to the related technical solution. In Table1, N₁ is the number of neighbouring reference samples for CCLM in aconventional technical solution, and N₂ is the number of neighbouringreference samples for CCLM after sample reduction according to the L0138proposal. Specifically, a sample reduction method in the L0138 proposalis performing down-sampling on neighbouring reference samples after theneighbouring reference samples are acquired through the conventionaltechnical solution.

TABLE 1 Size of the second colour component block N₁ N₂ 2 × 2 4 2 2 ×n/n × 2(n > 2) 4 4 4 × 4/4 × n/n × 4(n > 4) 8 8 8 × 8/8 × n/n × 8(n > 8)16 8 16 × 16/16 × n/n × 16(n > 16) 32 8 32 × 32 64 8

(d) Scheme of Neighbouring Reference Sample Down-Sampling

For a non-square decoding block, a down-sampling scheme for the longside (illustrated in FIG. 4B) is provided in the VTM. As theabovementioned L0138 proposal, a down-sampled set obtained by furthersample reduction is proposed in the proposal.

In the L0138 proposal, selection of neighbouring reference samples in adown-sampling process may influence the decoding prediction performance,and the decoding prediction performance corresponding to a subset of theneighbouring reference samples obtained by a default down-samplingsolution in the VTM is not so ideal. Therefore, it is proposed in theL0138 proposal that another solution for selecting a subset of theneighbouring reference samples may be adopted during down-sampling.Specifically, in the conventional technical solution adopted in the VTM,when a long side of a non-square decoding block is down-sampled, sampleselection is started from a leftmost edge for samples in an adjacent rowcorresponding to an upper side of the decoding block, and sampleselection is started from an uppermost edge for samples in an adjacentcolumn corresponding to a left side. A solution of starting sampleselection from edges opposite to those in the conventional technicalsolution is proposed in the L0138 proposal, and may specifically referto sample selection structure examples illustrated in FIG. 5A and FIG.5B.

FIG. 5A illustrates a structure diagram of selecting neighbouringreference samples according to a conventional technical scheme in therelated technical solution. As illustrated in FIG. 5A, sample selectionfor sampling is started from samples of the leftmost edge for thesamples in the adjacent row corresponding to the long side of thedecoding block. FIG. 5B illustrates a structure diagram of selectingneighbouring reference samples according to an L0138 proposal in therelated technical solution. As illustrated in FIG. 5B, sample selectionfor sampling is started from samples of a rightmost edge for the samplesin the adjacent row corresponding to the long side of the decodingblock. Here, a sampling interval is the same as the conventionaltechnical solution and will not be elaborated in the embodiment of thedisclosure. With the sample selection scheme in the L0138 proposal, avalue range of all neighbouring reference samples may be completelycovered during model parameter calculation of CCLM. However, importanceof each neighbouring reference sample is not considered, andconsequently, the overall characteristic of the long side may still notbe maximally represented on the premise of a limited number.

In the related technical solution, the operation complexity isconsidered on one hand. Searching 2N points for the maximum first colourcomponent neighbouring reference value and the minimum first colourcomponent neighbouring reference value to deduce the model parametersaccording to the principle that “two points determine a line” (referringto the formula (3)) is accepted in the VTM. Only two neighbouringreference samples are utilized in the solution, so that the operationcomplexity is greatly reduced, compared with that of model parameters ofthe least-square-based regression construction. However, the solution isstill high in complexity mainly because the maximum and minimum in theset of neighbouring reference samples are required to be determined and4N comparison operations are required to be executed to determine themaximum and the minimum. Moreover, if the length of the decoding blockis greater, the number of the neighbouring reference samples thereof forCCLM is greater, which results in the number of times of searching fordetermining the maximum and the minimum to be greater, so that theoperation complexity of the solution is still high. The predictionaccuracy is considered on the other hand. If a correlation between asample obtained by searching and a present decoding block is low in aprocess of searching the maximum and the minimum, it may be determinedthat the sample is a defective sample. In such case, if the two samplesobtained by searching include a defective sample, the prediction modelmay have a relatively great model error. Therefore, the maximum andminimum-based model parameter construction method is relatively low incomplexity but poor in robustness, and the decoding predictionperformance is reduced to a certain extent.

Based on this, the latest L0138 proposal proposes the concept of asubset of the neighbouring reference samples. The abovementionedshortcomings are improved to a certain extent, namely not only is thenumber of the neighbouring reference samples reduced to further reducethe operation complexity, but also the samples at proper positions areselected (as illustrated in FIG. 5B) to slightly improve the decodingprediction performance. However, there is still room for improvement ofthe solution.

For improving the encoding and decoding prediction performance better,the embodiments of the disclosure provide a prediction method fordecoding. A midpoint of at least one side of a block to be decoded istaken as a reference point, reference sample positions to be selectedare determined according to a preset number of samples, neighbouringreference samples selected in consideration of both importance anddispersion are put in a subset of the neighbouring reference samples,and prediction decoding is performed on the block to be decoded based onthe subset of the neighbouring reference samples. In such a manner,model parameters constructed based on the subset of the neighbouringreference samples are relatively accurate, so that the decodingprediction performance may be improved. Moreover, the subset of theneighbouring reference samples includes few samples, so that the searchcomplexity is also reduced, and the bit rate is further reduced. Theembodiments of the disclosure will be described below in combinationwith the drawings in detail.

FIG. 6 illustrates a composition block diagram example of a video codingsystem according to an embodiment of the disclosure. As illustrated inFIG. 6 , the video coding system 600 includes components such astransformation and quantization 601, intra estimation 602, intraprediction 603, motion compensation 604, motion estimation 605, inversetransformation and inverse quantization 606, filter control analysis607, deblocking filtering and Sample Adaptive Offset (SAO) filtering608, header information coding and Context-based Adaptive BinaryArithmetic Coding (CABAC) 609 and decoded picture buffer 610. For aninput original video signal, a video encoding block may be obtained bypartitioning a Coding Tree Unit (CTU), and then residual sampleinformation obtained by intra or inter prediction is processed throughthe transformation and quantization 601 to transform the video encodingblock, including transforming the residual information from a sampledomain to a transformation domain and quantizing an obtainedtransformation coefficient to further reduce a bit rate. The intraestimation 602 and the intra prediction 603 are configured to performintra prediction on the video encoding block. Exactly, the intraestimation 602 and the intra prediction 603 are configured to determinean intra prediction mode to be used for encoding the video encodingblock. The motion compensation 604 and the motion estimation 605 areconfigured to execute intra prediction coding on the received videoencoding block relative to one or more blocks in one or more referenceframes to provide time prediction information. Motion estimationexecuted by the motion estimation 605 is a process of generating amotion vector. The motion vector may be used to estimate motion of thevideo encoding block, and then the motion compensation 604 executesmotion compensation based on the motion vector determined by the motionestimation 605. After the intra prediction mode is determined, the intraprediction 603 is further configured to provide selected intra predicteddata for the header information coding and CABAC 609, and the motionestimation 605 also sends motion vector data determined by calculationto the header information coding and CABAC 609. In addition, the inversetransformation and inverse quantization 606 is configured to reconstructthe video encoding block, namely a residual block is reconstructed inthe sample domain. An artifact with a blocking effect in thereconstructed residual block is removed through the filter controlanalysis 607 and the deblocking filtering and SAO filtering 608 and thenthe reconstructed residual block is added to a predictive block in aframe of the decoded picture buffer 610 to generate a reconstructedvideo encoding block. The header information coding and CABAC 609 isconfigured to encode various coding parameters and quantizedtransformation coefficients. In a CABAC-based coding algorithm, acontext content may encode information indicating the determined intraprediction mode based on adjacent encoding blocks to output a codestream of the video signal. The decoded picture buffer 610 is configuredto store the reconstructed video encoding block for predictionreference. As video pictures are encoded, new reconstructed videoencoding blocks may be continuously generated, and these reconstructedvideo encoding blocks may be stored in the decoded picture buffer 610.

FIG. 7 illustrates a composition block diagram example of a videodecoding system according to an embodiment of the disclosure. Asillustrated in FIG. 7 , the video decoding system 700 includescomponents such as header information decoding and CABAC decoding 701,inverse transformation and inverse quantization 702, intra prediction703, motion compensation 704, deblocking filtering and SAO filtering 705and decoded picture buffer 706. After coding processing illustrated inFIG. 6 is performed on an input video signal, a code stream of the videosignal is output. The code stream is input to the video decoding system700, and is processed through the header information decoding and CABACdecoding 701 at first to obtain a decoded transformation coefficient.The transformation coefficient is processed through the inversetransformation and inverse quantization 702 to generate a residual blockin a sample domain. The intra prediction 703 may be configured togenerate predicted data of a present video decoding block based on adetermined intra prediction mode and data of a previous decoded blockfrom a present frame or picture. The motion compensation 704 analyzes amotion vector and another associated syntactic element to determineprediction information for the video decoding block and generates apredictive block of the video decoding block that is presently decodedby use of the prediction information. The residual block from theinverse transformation and inverse quantization 702 and thecorresponding predictive block generated by the intra prediction 703 orthe motion compensation 704 are summed to form a decoded video block. Anartifact with a blocking effect in the decoded video signal may beremoved through the deblocking filtering and SAO filtering 705 toimprove the video quality. Then, the decoded video block is stored inthe decoded picture buffer 706. The decoded picture buffer 706 stores areference picture for subsequent intra prediction or motion compensationand also outputs a video signal, namely the recovered original videosignal is obtained.

The embodiments of the disclosure are mainly applied to intra prediction603 illustrated in FIG. 6 and intra prediction 703 illustrated in FIG. 7. That is, the embodiments of the disclosure may be applied to a codingsystem and may also be applied to a decoding system. However, nospecific limits are made thereto in the embodiments of the disclosure.

Based on the application scenario example illustrated in FIG. 6 or FIG.7 , FIG. 8 illustrates a flowchart of a prediction method for decodingaccording to an embodiment of the disclosure. The method may include thefollowing operations.

In S801, reference samples adjacent to at least one side of a decodingblock are acquired to obtain a first set of neighbouring referencesamples.

In S802, a reference point is determined from the at least one side, andreference sample positions to be selected corresponding to the at leastone side are determined according to a preset number of samples.

In S803, reference samples corresponding to the reference samplepositions to be selected are selected from the first set of neighbouringreference samples based on the reference sample positions to beselected, and the selected reference samples form a subset of theneighbouring reference samples.

In S804, prediction decoding is performed on the decoding block based onthe subset of the neighbouring reference samples.

It is to be noted that the decoding block (block to be decoded) is adecoding block that second colour component prediction or third colourcomponent prediction is presently required to be performed on. The atleast one side of the decoding block may refer to an upper side of thedecoding block, may also refer to a left side of the decoding block andmay even refer to the upper side and left side of the decoding block. Nospecific limits are made in the embodiment of the disclosure.

It is also to be noted that the reference point may be a midpoint of theat least one side, may also be a first reference sample position on theleft of the midpoint of the at least one side, may also be a firstreference sample position on the right of the midpoint of the at leastone side and may even be another reference sample position of the atleast one side. No specific limits are made in the embodiment of thedisclosure.

In the embodiment of the disclosure, the prediction method for decodingof the embodiment of the disclosure may also be applied to a codingsystem. A subset of the neighbouring reference samples may beconstructed in the coding system to improve the video picture codingprediction performance and improve the coding compression efficiency toreduce the coding rate. The following descriptions are made only withconstruction of the subset of the neighbouring reference samples in adecoding system as an example.

In the embodiment of the disclosure, the reference samples adjacent tothe at least one side of the decoding block are acquired at first toobtain the first set of neighbouring reference samples. Then, thereference point is determined from the at least one side, and thereference sample positions to be selected corresponding to the at leastone side are determined according to the preset number of samples. Next,the reference samples corresponding to the reference sample positions tobe selected are selected from the first set of the neighbouringreference samples based on the reference sample position to be selected,and the selected reference samples form the subset of the neighbouringreference samples. Finally, prediction decoding is performed on thedecoding block based on the subset of the neighbouring referencesamples. In the embodiment of the disclosure, not all reference samplesadjacent to the upper side or left side of the decoding blockparticipate in a search operation for decoding prediction, and instead,neighbouring reference samples at proper positions are selected inconsideration of both importance and dispersion to form the subset ofthe neighbouring reference samples. In this way, the subset of theneighbouring reference samples includes few samples, the searchcomplexity may be reduced, the decoding prediction performance may alsobe improved, and the bit rate is further reduced.

In some embodiments, the operation that the reference point isdetermined from the at least one side includes the following operation.

A midpoint of the at least one side is determined based on a length ofthe at least one side, and the midpoint of the at least one side isdetermined as the reference point.

In some embodiments, when the reference point is the midpoint of the atleast one side, the operation that the reference point is determinedfrom the at least one side includes the following operation.

Based on the length of the at least one side, if the midpoint of the atleast one side is at a middle position between two reference samples, afirst reference sample position on the right of the middle position isdetermined as the reference point of the at least one side, or a firstreference sample position on the left of the middle position isdetermined as the reference point of the at least one side.

It is to be noted that, considering that the importance of the referencesample adjacent to the at least one side of the decoding block iscorrelated with a corresponding position thereof, for making thereference sample in the subset of the neighbouring reference samplesrepresentative of a characteristic of the whole adjacent side, it isnecessary to select a reference sample at a central position of the sideas much as possible, so as to remove a sample with relatively lowimportance (for example, reference samples on two edges of the side). Inthe embodiment of the disclosure, if descriptions are made with theupper side of the decoding block as an example, a first reference sampleposition on the right or left of a middle position may be determined asa reference point of the side.

Exemplarily, referring to FIG. 9 , a structure diagram of selecting asubset of the neighbouring reference samples corresponding to an upperside of a decoding block according to an embodiment of the disclosure isillustrated. As illustrated in FIG. 9 , for all reference samplesdistributed on the upper side of the decoding block, a midpoint of theside is selected as a center (the dotted position illustrated in FIG. 9), and reference samples are selected by taking the center as areference point. If a length of the upper side of the decoding decodingblock is 16 and the preset number of samples is 4, it may be obtainedthat a sampling interval Δ is 16/4=4. In such case, since the length ofthe upper side is 16, it may be determined that the midpoint is between7 and 8, that is, 7 or 8 may be selected as the midpoint. In FIG. 9 ,for example, 8 is selected as the reference point. Since the presetnumber of samples is 4, it may be determined that reference samplepositions to be selected (as illustrated by the gray points in FIG. 9 )are 2, 6, 10 and 14. The corresponding reference samples may be selectedaccording to these reference sample positions to form the subset of theneighbouring reference samples.

In some embodiments, when the reference point is the midpoint of the atleast one side, the operation that the reference point is determinedfrom the at least one side includes the following operation.

Based on the length of the at least one side, if the midpoint of the atleast one side is at a middle position between two reference samples, afirst reference sample position lower than the middle position isdetermined as the reference point of the at least one side, or a firstreference sample position upper than the middle position is determinedas the reference point of the at least one side.

It is to be noted that, considering that the importance of the referencesample adjacent to the at least one side of the decoding block iscorrelated with a corresponding position thereof, for making thereference sample in the subset of the neighbouring reference samplesrepresentative of a characteristic of the whole adjacent side, it isnecessary to select a reference sample at a central position of the sideas much as possible to remove a sample with relatively low importance(for example, reference samples on two edges of the side). In theembodiment of the disclosure, if descriptions are made with the leftside of the decoding block as an example, a first reference sampleposition lower or upper than a middle position may be determined as areference point of the side.

Exemplarily, referring to FIG. 10 , a structure diagram of selecting asubset of the neighbouring reference samples corresponding to a leftside of a block to be decoded according to an embodiment of thedisclosure is illustrated. As illustrated in FIG. 10 , for all referencesamples distributed on the left side of the block to be decoded, amidpoint of the side is selected as a center (the dotted positionillustrated in FIG. 10 ), and reference samples are selected by takingthe center as a reference point. If a length of the upper side of thedecoding block is 8 and the preset number of samples is 2, it may beobtained that a sampling interval Δ is 8/2=4. In such case, since thelength of the left side is 8, it may be determined that the midpoint isbetween 3 and 4, that is, 3 or 4 may be selected as the midpoint. InFIG. 10 , for example, 4 is selected as the reference point. Since thepreset number of samples is 2, it may be determined that referencesample positions to be selected (as illustrated by the gray points inFIG. 10 ) are 2 and 6. The corresponding reference samples may beselected according to these reference sample positions to form thesubset of the neighbouring reference samples.

During a practical application, since the length of the left side orupper side of the decoding block is an integral multiple of 2, themiddle position of the left side or upper side of the decoding block isbetween two points. In the example illustrated in FIG. 9 , the firstsample on the right of the middle position is determined as the midpointof the side. However, the first sample on the left of the middleposition may also be determined as the midpoint of the side in theembodiment of the disclosure, as illustrated in the structure example ofFIG. 11 . In FIG. 11 , the first sample (for example, 3 in FIG. 11 ) onthe left of the middle position is determined as the midpoint of theside. Since the preset number of samples is 2, it may be determined thatthe reference sample positions to be selected (as illustrated by thegray points in FIG. 11 ) are 1 and 5. The corresponding referencesamples may also be selected according to these reference samplepositions to form the subset of the neighbouring reference samples.Therefore, in the embodiment of the disclosure, for the upper side ofthe decoding block, the first sample on the right of the middle positionmay be determined as the midpoint of the side, and the first sample onthe left of the middle position may also be determined as the midpointof the side. No specific limits are made in the embodiment of thedisclosure. In addition, for the left side of the decoding block, thefirst sample lower than the middle position may be determined as themidpoint of the side, and the first sample upper than the middleposition may also be determined as the midpoint of the side. No specificlimits are made in the embodiment of the disclosure.

Unless otherwise specified, the following descriptions are made with theupper side of the decoding block as an example. However, the predictionmethod of the embodiment of the disclosure is also applied to the leftside of the decoding block and even another side of the decoding block.

It is to be understood that, without considering existence of thereference samples adjacent to the left side or upper side of thedecoding block, the subset of the neighbouring reference samples mayalso be constructed according to a formula (4) and a formula (5):Δ=length/(N ₂/2)  (4).shift=Δ/2  (5).

A represents the sampling interval, length represents the number ofreference samples in a row adjacent to the upper side of the decodingblock or the number of reference samples in a column adjacent to theleft side of the decoding block, N₂ represents the expected number(generally ½ for each of the left side and the upper side, but nospecific limits are made in the embodiment of the disclosure) ofneighbouring reference samples, forming the subset of the neighbouringreference samples, of the decoding block, and shift represents astarting point position for selection of the reference samples. Here,when the middle position of the left side or upper side of the decodingblock is between two points, if the first sample on the right of themiddle position is determined as the midpoint of the side, the startingpoint position is shift=Δ/2, and if the first sample on the left of themiddle position is determined as the midpoint of the side, the startingpoint position is shift=Δ/2−1.

Exemplarily, taking the upper side illustrated in FIG. 9 as an example,length is equal to 16 and N₂ is equal to 8, assuming ½ for each of theleft side and the upper side, namely the preset number of samples of theupper side is 4, Δ=length/(N₂/2)=4 and shift=→/2=2 are calculatedaccording to the formula (4) and the formula (5) respectively, namelythe starting point position is 2 and the sampling interval is 4. Thereference sample positions to be selected, for example, 2, 6, 10 and 14,may be determined at first, and furthermore, the corresponding referencesamples may be selected to form the subset of the neighbouring referencesamples. It is to be noted that the preset number of samplescorresponding to the left side and the preset number of samplescorresponding to the upper side may be same or different, and nospecific limits are made in the embodiment of the disclosure.

In addition, the embodiment of the disclosure also provides a scheme fordetermining the preset number of samples, as illustrated in Table 2. Insuch case, in the embodiment of the disclosure, N₂′ in Table 2 may alsobe substituted into the formula (4) and the formula (5) instead of N₂for calculation, so that the formed subset of the neighbouring referencesamples is more accurate, thereby improving the decoding predictionperformance

Table 2 illustrates a relationship table between a size of a secondcolour component block corresponding to a decoding block and the numberof neighbouring reference samples according to the embodiment of thedisclosure. In Table 2, N represents a length of a short side of thedecoding block, N₁ represents the number of the neighbouring referencesamples in the conventional technical solution, N₂ is the number of theneighbouring reference samples in the L0138 proposal, and N₂′ is thenumber of the neighbouring reference samples in the embodiment of thedisclosure. It can be seen according to Table 2 that, when the length ofthe short side of the decoding block is less than or equal to 4, thesubset of the neighbouring reference samples includes four referencesamples, and when the length of the short side of the decoding block isgreater than 4, the subset of the neighbouring reference samples mayinclude eight reference samples.

TABLE 2 Size of the second colour Length of the component block shortside N₁ N₂ N₂′ 2 × n/n × 2(n ≥ 2) 2 4 2 4 4 × n/n × 4(n ≥ 4) 4 8 4 4 8 ×n/n × 8(n ≥ 8) 8 16 8 8 16 × n/n × 16(n ≥ 16) 16 32 8 8 32 × 32 32 64 88

In some embodiments, the operation that the reference point isdetermined from the at least one side and the reference sample positionsto be selected corresponding to the at least one side are determinedaccording to the preset number of samples includes the followingoperations.

A first sampling interval is calculated based on the preset number ofsamples and the length of the at least one side.

The midpoint of the at least one side is determined as the referencepoint, and the reference sample positions to be selected correspondingto the at least one side are determined according to the first samplinginterval.

In at least one embodiment, the operation that the midpoint of the atleast one side is determined as the reference point and the referencesample positions to be selected corresponding to the at least one sideare determined according to the first sampling interval includes thefollowing operations.

A midpoint value of the at least one side is calculated based on thelength of the at least one side.

Reference sample positions are calculated according to the midpointvalue and the first sampling interval.

When the midpoint value is non-integral, a reference sample position ona left side of the midpoint value is rounded down, the rounded referencesample position is determined as a reference sample position to beselected; and a reference sample position on a right side of themidpoint value is rounded up, and the rounded reference sample positionis determined as a reference sample position to be selected.

In at least one embodiment, the operation that the midpoint of the atleast one side is determined as the reference point and the referencesample positions to be selected corresponding to the at least one sideare determined according to the first sampling interval includes thefollowing operations.

A midpoint value of the at least one side is calculated based on thelength of the at least one side.

Reference sample positions are calculated according to the midpointvalue and the first sampling interval.

When the midpoint value is non-integral, a reference sample position onthe left side of the midpoint value is rounded up and the roundedreference sample position is determined as a reference sample positionto be selected; and, a reference sample position on the right side ofthe midpoint value is rounded down and the rounded reference sampleposition is determined as a reference sample position to be selected.

It is to be noted that, according to a preset number of samples and alength of a side of the decoding block, a first sampling intervalcorresponding to the side may be calculated. In addition, since thelength of the left side or upper side of the decoding block is anintegral multiple of 2, the middle position of the left side or upperside of the decoding block is between two points, and in such case, acalculated midpoint value is non-integral and a calculated referencesample position is also non-integral. However, if the length of the leftside or upper side of the decoding block is not an integral multiple of2, the middle position of the left side or upper side of the decodingblock may not be between two points, and in such case, the calculatedmidpoint value is integral and the calculated reference sample positionis also integral. That is, the calculated midpoint value may be integraland may also be non-integral, and correspondingly, the calculatedreference sample position may be integral and may also be non-integral.No specific limits are made in the embodiment of the disclosure.

Therefore, when the calculated midpoint value is integral, thecalculated reference sample position is correspondingly integral, and insuch case, the calculated reference sample position may be directlydetermined as the reference sample position to be selected. When thecalculated midpoint is non-integral, the calculated reference sampleposition is correspondingly non-integral, and in such case, thereference sample position to be selected may be determined byrounding-up or rounding-down.

For example, taking the upper side illustrated in FIG. 11 as an example,if the preset number of samples is 2 and the length of the upper side is8, it may be determined that the first sampling interval is 4. Thelength of the upper side is 8, namely the middle position of the upperside is between two points. Since arrangement of reference samplesstarts from 0 and ends at 7, it may be obtained by calculation that apractical position of the midpoint of the upper side is 3.5. Since thefirst sampling interval is 4, reference sample positions 1.5 and 5.5 maybe obtained by shifting 4/2 points on the left and right sides of themidpoint respectively. In such case, the reference sample position onthe left side of the midpoint value may be rounded down to obtain onereference sample position to be selected 1, and the reference sampleposition on the right side of the midpoint value may be rounded up toobtain the other reference sample position to be selected 6. The methodmay also be called a rounding-out scheme, as illustrated in FIG. 12 . Insuch case, reference samples corresponding to the positions 1 and 6 mayform the subset of the neighbouring reference samples. In addition, whenthe reference sample positions 1.5 and 5.5 are calculated, the referencesample position on the left side of the midpoint value may also berounded up to obtain one reference sample position to be selected 2, andthe reference sample position on the right side of the midpoint valuemay be rounded down to obtain the other reference sample position to beselected 5. The method may also be called a rounding-in scheme, asillustrated in FIG. 13 . In such case, reference samples correspondingto the positions 2 and 5 may form the subset of the neighbouringreference samples.

In some embodiments, after the operation that the first samplinginterval is calculated, the method further includes the followingoperations.

The first sampling interval is regulated to obtain a second samplinginterval.

The midpoint of the at least one side is determined as the referencepoint, and the reference sample positions to be selected correspondingto the at least one side are determined according to the second samplinginterval.

In some embodiments, after the operation that the second samplinginterval is obtained, the method further includes the followingoperation.

The midpoint of the at least one side is determined as the referencepoint, a reference sample position to be selected corresponding to aleft side of the reference point is determined according to the firstsampling interval, and a reference sample position to be selectedcorresponding to a right side of the reference point is determinedaccording to the second sampling interval.

It is to be noted that, after the first sampling interval is calculated,the first sampling interval may further be finely regulated, forexample, the first sampling interval is added or subtracted by 1, toobtain the second sampling interval. For example, if the first samplinginterval is 4, the second sampling interval obtained by regulation maybe 3 or 5. In the embodiment of the disclosure, regulation of the firstsampling interval may be slight (for example, adding 1 or subtracting 1)regulation, but a specific setting of a regulation amplitude is notspecifically limited in the embodiment of the disclosure.

In addition, after the reference point of the at least one side of thedecoding block is determined, uniform sampling may be performedaccording to the first sampling interval or the second samplinginterval, or nonuniform sampling may be performed according to the firstsampling interval and the second sampling interval. The reference samplepositions to be selected determined after sampling may be distributedsymmetrically on the two sides of the reference point and may also bedistributed asymmetrically on the two sides of the reference point. Nospecific limits are made in the embodiment of the disclosure.

In some embodiments, the operation that the reference point isdetermined from the at least one side and the reference sample positionsto be selected corresponding to the at least one side is determinedaccording to the preset number of samples includes the followingoperation.

A midpoint of the at least one side is determined as the referencepoint, and continuous reference sample positions near the referencepoint are determined as reference sample positions to be selectedaccording to the preset number of samples. The reference point is at amiddle position of the reference sample positions to be selected.

It is to be noted that, since a reference sample at a middle position iscorrelated more with a first colour component reconstructed value of adecoding block in neighbouring reference samples, continuous referencesample positions having the preset number of samples near the middleposition may be determined as reference sample positions to be selected.This method may be called a middle-position-based continuous sampleselection scheme, as illustrated in FIG. 14 . In such case, referencesamples corresponding to the positions 2, 3 and 4 may form the subset ofthe neighbouring reference samples.

It can be understood that, if reference sample positions in a row/columnadjacent to the upper side or left side of the decoding block arenumbered from 0, the number of neighbouring reference samples in theformed subset of the neighbouring reference samples and thecorresponding reference sample positions to be selected in theembodiment are illustrated in Table 3.

TABLE 3 Length of the left side or upper side Reference sample Presetnumber of of the decoding block positions to be selected samples 2 0, 12 4 1, 2 2 8 2, 3, 4 (or 3, 4, 5) 3 16 6, 7, 8, 9 4 32 13, 14, 15, 16,17, 18, 19, 20 8

In the embodiment, the continuous reference sample positions having thepreset number of samples near the middle position are determined as thereference sample positions to be selected, so as to form the subset ofthe neighbouring reference samples. Prediction decoding is performedaccording to the subset of the neighbouring reference samples, which maystill reduce the bit rate and improve the decoding gain based on theL0138 proposal, thereby improving the decoding prediction performance.

In some embodiments, the decoding block includes a square decoding blockor a non-square decoding block.

Furthermore, in some embodiments, when the decoding block is anon-square decoding block, the method further includes the followingoperations.

A long side of the decoding block and a third sampling intervalcorresponding to the long side are determined based on the length of theat least one side of the decoding block.

A reference sample corresponding to an ending position of the long sideis deleted, initial offsetting is performed according to a preset offseton the long side that the reference sample is deleted from, an offsetreference sample position is determined as a starting point, and thelong side that the reference sample is deleted from is sampled accordingto the third sampling interval to determine reference sample positionsto be selected corresponding to the long side.

It is to be noted that the embodiment of the disclosure may be appliedto a square decoding block and may also be applied to a non-squaredecoding block. No specific limits are made in the embodiment of thedisclosure.

It is also to be noted that, when the decoding block is a non-squaredecoding block, one of the left side and upper side of the decodingblock is a long side and the other is a short side. The third samplinginterval corresponding to the long side may be obtained according to aratio of the long side to the short side. Before the long side issampled, the reference sample corresponding to the ending position ofthe long side may be deleted at first, then initial offsetting isperformed on the long side that the reference sample is deleted fromaccording to the preset offset, the offset reference sample position istaken as the starting point, and then the long side that the referencesample is deleted from is sampled to determine reference samplepositions to be selected corresponding to the long side. In theembodiment of the disclosure, the preset offset may be ½ of the thirdsampling interval and may also be another value. No specific limits aremade in the embodiment of the disclosure.

Exemplarily, in the related technical solution, reference samplesampling for the long side of the non-square decoding block isillustrated in FIG. 4B. In FIG. 4B, it may be determined according tothe ratio of the long side to the short side that the third samplinginterval is 4. A first reference sample position on the left of the longside is determined as the starting point, and then reference samples inthe same count as neighbouring reference samples of the short side areselected according to the third sampling interval. In such case, thesampled reference samples are on the left and may not cover thecharacteristic of the whole long side. Therefore, in the embodiment,initial offsetting is performed on the long side of the non-squaredecoding block at first to ensure that the sampled reference samples maycover the characteristic of the whole long side. For example, the presetoffset is ½ of the third sampling interval, namely the preset offset is2, that is, sampling starts from 2 in the embodiment. In such case, theformed subset of the neighbouring reference samples may cover thecharacteristic of the whole long side better.

In some embodiments, the operation that the reference point isdetermined from the at least one side and the reference sample positionsto be selected corresponding to the at least one side is determinedaccording to the preset number of samples includes the followingoperations.

Reference samples corresponding to a starting position and endingposition of the at least one side are deleted to obtain a second set ofneighbouring reference samples.

A midpoint of the at least one side is determined as the referencepoint, and the reference sample positions to be selected are determinedbased on the second set of the neighbouring reference samples and thepreset number of samples.

It is to be noted that, in the embodiment of the disclosure, thereference samples may be directly selected based on the midpoint of theleft side or upper side of the decoding block as the reference point toform the subset of the neighbouring reference samples. In the embodimentof the disclosure, reference samples respectively corresponding to astarting position and ending position (for example, for the upper side,the starting position is a left edge position and the ending position isa right edge position; and for the left side, the starting position isan upper edge position and the ending position is a lower edge position)corresponding to the left side/upper side of the decoding block may bedeleted at first, with reference samples of a middle part reserved, andthen the selected reference samples form the subset of the neighbouringreference samples.

It is also to be noted that the preset number of samples may be anyvalue. Generally, the preset number of samples is less than N₁ in Table2. However, the embodiment of the disclosure is not limited to that thepreset number of samples is equal to N₂ or N₂′. The preset number ofsamples is less than N₁ in Table 2, so that the search complexity of thereference samples may be reduced to improve the decoding predictionperformance. Specifically, values of A and shift in the formula (4) andthe formula (5) may be changed to implement determination of referencesample positions to be selected based on different starting points andsampling intervals and further select corresponding reference samples toform the subset of the neighbouring reference samples.

In some embodiments, the operation that prediction decoding is performedon the decoding block based on the subset of the neighbouring referencesamples includes the following operations.

Model parameters are determined based on the subset of the neighbouringreference samples.

A prediction model is established according to the model parameters. Theprediction model represents a prediction relationship between a firstcolour component and a second colour component corresponding to eachsample in the decoding block.

Prediction decoding is performed on the decoding block based on theprediction model.

It is to be noted that, after the subset of the neighbouring referencesamples is obtained, the model parameters α and β may be constructed,then the prediction model may be established according to the formula(1) and prediction decoding may be performed on the decoding blockaccording to the prediction model. Both importance and dispersion areconsidered for neighbouring reference samples included in the subset ofthe neighbouring reference samples, so that the constructed modelparameter is more accurate, thereby improving the decoding predictionperformance and further reducing the bit rate.

The above embodiments provide a prediction method for decoding. Thereference samples adjacent to the at least one side of the decodingblock are acquired to obtain the first set of neighbouring referencesamples. The reference point is determined from the at least one side,and the reference sample positions to be selected corresponding to theat least one side is determined according to the preset number ofsamples. The reference samples corresponding to the reference samplepositions to be selected are selected from the first set of neighbouringreference samples based on the reference sample positions to beselected, and the selected reference samples form the subset of theneighbouring reference samples. Prediction decoding is performed on thedecoding block based on the subset of the neighbouring referencesamples. Both importance and dispersion are considered for theneighbouring reference samples in the subset of the neighbouringreference samples, and the subset of the neighbouring reference samplesincludes few samples, so that the search complexity is reduced, thevideo picture decoding prediction performance is improved, and the bitrate is further reduced.

Based on the same inventive concept of the technical solutionillustrated in FIG. 8 , FIG. 15 illustrates a structure diagram of aprediction device for decoding 150 according to an embodiment of thedisclosure. The prediction device for decoding 150 may include anacquisition unit 1501, a determination unit 1502, a selection unit 1503and a decoding unit 1504.

The acquisition unit 1501 is configured to acquire reference samplesadjacent to at least one side of a decoding block to obtain a first setof neighbouring reference samples.

The determination unit 1502 is configured to determine a reference pointfrom the at least one side and determine reference sample positions tobe selected corresponding to the at least one side according to a presetnumber of samples.

The selection unit 1503 is configured to select reference samplescorresponding to the reference sample positions to be selected from thefirst set of the neighbouring reference samples based on the referencesample positions to be selected and form a subset of the neighbouringreference samples using the selected reference samples.

The decoding unit 1504 is configured to perform prediction decoding onthe decoding block based on the subset of the neighbouring referencesamples.

In the solution, the determination unit 1502 is specifically configuredto, based on a length of the at least one side, if a midpoint of the atleast one side is at a middle position between two reference samples,determine a first reference sample position on the right of the middleposition as the reference point of the at least one side or determine afirst reference sample position on the left of the middle position asthe reference point of the at least one side.

In the solution, the determination unit 1502 is specifically configuredto, based on the length of the at least one side, if the midpoint of theat least one side is at a middle position between two reference samples,determine a first reference sample position lower than the middleposition as the reference point of the at least one side or determine afirst reference sample position upper than the middle position as thereference point of the at least one side.

In the solution, referring to FIG. 15 , the prediction device fordecoding 150 further includes a calculation unit 1505, configured tocalculate a first sampling interval based on the preset number ofsamples and the length of the at least one side.

The determination unit 1502 is specifically configured to determine themidpoint of the at least one side as the reference point and determinethe reference sample positions to be selected corresponding to the atleast one side according to the first sampling interval.

In the solution, the calculation unit 1505 is further configured tocalculate a midpoint value of the at least one side based on the lengthof the at least one side and calculate reference sample positionsaccording to the midpoint value and the first sampling interval.

The determination unit 1502 is specifically configured to, when themidpoint value is non-integral, round down a reference sample positionon a left side of the midpoint value and determine the rounded referencesample position as a reference sample position to be selected, round upa reference sample position on a right side of the midpoint value anddetermine the rounded reference sample position as a reference sampleposition to be selected.

In the solution, the calculation unit 1505 is further configured tocalculate the midpoint value of the at least one side based on thelength of the at least one side and calculate reference sample positionsaccording to the midpoint value and the first sampling interval.

The determination unit 1502 is specifically configured to, when themidpoint value is non-integral, round up a reference sample position onthe left side of the midpoint value and determine the rounded referencesample position as a reference sample position to be selected, rounddown a reference sample position on the right side of the midpoint valueand determine the rounded reference sample position as a referencesample position to be selected.

In the solution, referring to FIG. 15 , the prediction device fordecoding 150 further includes a regulation unit 1506, configured toregulate the first sampling interval to obtain a second samplinginterval.

The determination unit 1502 is further configured to determine themidpoint of the at least one side as the reference point and determinethe reference sample positions to be selected corresponding to the atleast one side according to the second sampling interval.

In the solution, the determination unit 1502 is further configured todetermine the midpoint of the at least one side as the reference point,determine a reference sample position to be selected corresponding to aleft side of the reference point according to the first samplinginterval and determine a reference sample position to be selectedcorresponding to a right side of the reference point according to thesecond sampling interval.

In the solution, the determination unit 1502 is further configured todetermine the midpoint of the at least one side as the reference pointand determine continuous reference sample positions near the referencepoint as reference sample positions to be selected according to thepreset number of samples. The reference point is at a middle position ofthe reference sample positions to be selected.

In the solution, the decoding block includes a square decoding block ora non-square decoding block.

In the solution, the acquisition unit 1501 is further configured todelete reference samples corresponding to a starting position and endingposition of the at least one side to obtain a second set of neighbouringreference samples.

The determination unit 1502 is further configured to determine themidpoint of the at least one side as the reference point and determinethe reference sample positions to be selected based on the second set ofthe neighbouring reference samples and the preset number of samples.

In the solution, referring to FIG. 15 , the prediction device fordecoding 150 further includes an establishment unit 1507, configured todetermine model parameters based on the subset of the neighbouringreference samples and establish a prediction model according to themodel parameters. The prediction model represents a predictionrelationship between a first colour component and a second colourcomponent corresponding to each sample in the decoding block.

The decoding unit 1504 is specifically configured to perform predictiondecoding on the decoding block based on the prediction model.

It can be understood that, in the embodiment, “unit” may be part of acircuit, part of a processor, part of a program or software and thelike, of course, may also be modular and may also be non-modular. Inaddition, each component in the embodiment may be integrated into aprocessing unit, each unit may also exist independently, and two or morethan two units may also be integrated into a unit. The integrated unitmay be implemented in a hardware form and may also be implemented inform of software function module.

When implemented in form of software function module and sold or used asan independent product, the integrated unit may be stored in acomputer-readable storage medium. Based on such an understanding, thetechnical solution of the embodiment substantially or parts makingcontributions to the conventional art or all or part of the technicalsolution may be embodied in form of software product, and the computersoftware product is stored in a storage medium, including a plurality ofinstructions configured to enable a computer device (which may be apersonal computer, a server, a network device or the like) or aprocessor to execute all or part of the operations of the method in theembodiment. The storage medium includes: various media capable ofstoring program codes such as a U disk, a mobile hard disk, a Read OnlyMemory (ROM), a Random Access Memory (RAM), a magnetic disk or anoptical disk.

Therefore, the embodiment provides a computer storage medium, whichstores a decoding prediction program. The decoding prediction program isexecuted by at least one processor to implement the operations of themethod in the technical solution illustrated in FIG. 8 .

Based on the composition of the prediction device for decoding 150 andthe computer storage medium, FIG. 16 illustrates a specific hardwarestructure example of the prediction device for decoding 150 provided inthe embodiment of the disclosure, which may include a network interface1601, a memory 1602 and a processor 1603. Each component is coupledtogether through a bus system 1604. It can be understood that the bussystem 1604 is configured to implement connection communication amongthese components. The bus system 1604 includes a data bus and furtherincludes a power bus, a control bus and a state signal bus. However, forclear description, various buses in FIG. 16 are marked as the bus system1604. The network interface 1601 is configured to receive and send asignal in a process of receiving and sending information with anotherexternal network element.

The memory 1602 is configured to store a computer program capable ofrunning in the processor 1603.

The processor 1603 is configured to run the computer program to executethe following operations.

Reference samples adjacent to at least one side of a decoding block areacquired to obtain a first set of neighbouring reference samples.

A reference point is determined from the at least one side, andreference sample positions to be selected corresponding to the at leastone side are determined according to a preset number of samples.

Reference samples corresponding to the reference sample positions to beselected are selected from the first set of the neighbouring referencesamples based on the reference sample positions to be selected, and theselected reference sample forms a subset of the neighbouring referencesamples.

Prediction decoding is performed on the decoding block based on thesubset of the neighbouring reference samples.

It can be understood that the memory 1602 in the embodiment of thedisclosure may be a volatile memory or a nonvolatile memory, or mayinclude both the volatile and nonvolatile memories. The nonvolatilememory may be a ROM, a Programmable ROM (PROM), an Erasable PROM(EPROM), an Electrically EPROM (EEPROM) or a flash memory. The volatilememory may be a RAM, and is used as an external high-speed cache. It isexemplarily but unlimitedly described that RAMs in various forms may beadopted, such as a Static RAM (SRAM), a Dynamic RAM (DRAM), aSynchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDRSDRAM), anEnhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM) and a Direct RambusRAM (DRRAM). It is to be noted that the memory 1602 of a system andmethod described in the disclosure is intended to include, but notlimited to, memories of these and any other proper types.

The processor 1603 may be an integrated circuit chip with a signalprocessing capability. In an implementation process, each operation ofthe method may be completed by an integrated logic circuit of hardwarein the processor 1603 or an instruction in a software form. Theprocessor 1603 may be a universal processor, a Digital Signal Processor(DSP), an Application Specific Integrated Circuit (ASIC), a FieldProgrammable Gate Array (FPGA) or another Programmable Logic Device(PLD), discrete gate or transistor logical device and discrete hardwarecomponent. Each method, step and logical block diagram disclosed in theembodiments of the disclosure may be implemented or executed. Theuniversal processor may be a microprocessor or the processor may also beany conventional processor and the like. The operations of the methoddisclosed in combination with the embodiments of the disclosure may bedirectly embodied to be executed and completed by a hardware decodingprocessor or executed and completed by a combination of hardware andsoftware modules in the decoding processor. The software module may belocated in a mature storage medium in this field such as a RAM, a flashmemory, a ROM, a PROM or EEPROM and a register. The storage medium islocated in the memory 1602. The processor 1603 reads information in thememory 1602 and completes the operations of the method in combinationwith hardware.

It can be understood that these embodiments described in the disclosuremay be implemented by hardware, software, firmware, middleware, amicrocode or a combination thereof. In case of implementation with thehardware, the processing unit may be implemented in one or more ASICs,DSPs, DSP Devices (DSPDs), PLDs, FPGAs, universal processors,controllers, microcontrollers, microprocessors, other electronic unitsconfigured to execute the functions in the disclosure or combinationsthereof.

In case of implementation with the software, the technology of thedisclosure may be implemented through the modules (for example,processes and functions) executing the functions in the disclosure. Asoftware code may be stored in the memory and executed by the processor.The memory may be implemented inside the processor or outside theprocessor.

In at least one embodiment, as another embodiment, the processor 1603 isfurther configured to run the computer program to execute the operationsof the method in the technical solution illustrated in FIG. 8 .

It is to be noted that the technical solutions in the embodiments of thedisclosure may be freely combined without conflicts.

The above is only the specific implementation mode of the disclosure andnot intended to limit the scope of protection of the disclosure. Anyvariations or replacements apparent to those skilled in the art withinthe technical scope disclosed by the disclosure shall fall within thescope of protection of the disclosure. Therefore, the scope ofprotection of the disclosure shall be subject to the scope of protectionof the claims.

INDUSTRIAL APPLICABILITY

In the embodiments of the disclosure, reference samples adjacent to atleast one side of a decoding block are acquired at first to obtain afirst set of neighbouring reference samples. Then, a reference point isdetermined from the at least one side, and reference sample positions tobe selected corresponding to the at least one side are determinedaccording to a preset number of samples. The reference samplescorresponding to the reference sample positions to be selected areselected from the first set of the neighbouring reference samples basedon the reference sample positions to be selected, and the selectedreference samples form a subset of the neighbouring reference samples.Finally, prediction decoding is performed on the decoding block based onthe subset of the neighbouring reference samples. Both importance anddispersion are considered for selection of neighbouring referencesamples in the subset of the neighbouring reference samples, so thatmodel parameters constructed based on the subset of the neighbouringreference samples is relatively accurate, and the video picture decodingprediction performance may be improved. Moreover, the subset of theneighbouring reference samples includes few samples, so that the searchcomplexity is also reduced, the video picture decoding predictionperformance is improved, and the bit rate is further reduced.

The invention claimed is:
 1. A prediction method for decoding,comprising: acquiring reference samples adjacent to at least one side ofa coding block; determining a reference point from the at least one sideand determining reference sample positions corresponding to the at leastone side according to a preset number of samples, wherein thedetermining comprises: determining the reference point from the at leastone side, and determining first reference sample position and secondreference sample position near the reference point as the referencesample positions according to the preset number of samples;, wherein thedetermining comprises (1) calculating a first sampling interval based onthe preset number of samples and the length of the at least one side;and (2) determining the reference point from the at least one side, anddetermining the reference sample positions corresponding to the at leastone side according to the first sampling interval; deriving referencesamples corresponding to the reference sample positions from thereference samples; and performing prediction on the coding block basedon the derived reference samples.
 2. The method of claim 1, wherein thereference point is at a middle position of the reference samplepositions.
 3. The method of claim 1, further comprising: determining,when the length of the at least one side is 8 and the preset number ofsamples is 3, the reference sample positions corresponding to the atleast one side to be 2, 3 and 4, or 3,4 and
 5. 4. The method of claim 1,wherein the at least one side comprises at least one of a left side oran upper side of the coding block.
 5. The method of claim 1, whereindetermining the reference point from the at least one side comprises:based on a length of the at least one side, responsive to that themidpoint of the at least one side is at a middle position between tworeference samples, determining a first reference sample position on theright of the middle position as the reference point of the at least oneside, or determining a first reference sample position on the left ofthe middle position as the reference point of the at least one side. 6.The method of claim 1, wherein determining the reference point from theat least one side comprises: based on the length of the at least oneside, responsive to that the midpoint of the at least one side is at amiddle position between two reference samples, determining a firstreference sample position lower than the middle position as thereference point of the at least one side, or determining a firstreference sample position upper than the middle position as thereference point of the at least one side.
 7. The method of claim 1,wherein determining the reference point from the at least one side anddetermining the reference sample positions corresponding to the at leastone side according to the first sampling interval comprises: calculatinga midpoint value of the at least one side based on the length of the atleast one side; calculating reference sample positions according to themidpoint value and the first sampling interval; and when the midpointvalue is non-integral, rounding down a reference sample position on aleft side of the midpoint value and determining the rounded referencesample position as a reference sample position, rounding up a referencesample position on a right side of the midpoint value and determiningthe rounded reference sample position as the reference sample position.8. The method of claim 1, wherein determining the reference point fromthe at least one side and determining the reference sample positionscorresponding to the at least one side according to the first samplinginterval comprises: calculating a midpoint value of the at least oneside based on the length of the at least one side; calculating referencesample positions according to the midpoint value and the first samplinginterval; and when the midpoint value is non-integral, rounding up areference sample position on the left side of the midpoint value anddetermining the rounded reference sample position as a reference sampleposition, rounding down a reference sample position on the right side ofthe midpoint value and determining the rounded reference sample positionas the reference sample position.
 9. The method of claim 1, furthercomprising: regulating the first sampling interval to obtain a secondsampling interval; and determining the reference point from the at leastone side, and determining the reference sample positions correspondingto the at least one side according to the second sampling interval. 10.The method of claim 9, further comprising: determining the referencepoint from the at least one side, determining a reference sampleposition corresponding to a left side of the reference point accordingto the first sampling interval, and determining a reference sampleposition corresponding to a right side of the reference point accordingto the second sampling interval.
 11. The method of claim 1, whereincalculating the first sampling interval based on the preset number ofsamples and the length of the at least one side comprises: calculatingthe first sampling interval based on the preset number of samples andthe length of the at least one side by using the formula (1):Δ=length/(N ₂/2)  (1) (1) where Δ represents the first samplinginterval, length represents the length of the at least one side, and N₂represents the preset number of samples; determining the reference pointfrom the at least one side and determining the reference samplepositions corresponding to the at least one side according to the firstsampling interval comprises: calculating a starting position ofreference samples according to the first sampling interval by using theformula (2); and determining the reference sample positionscorresponding to the at least one side according to the startingposition of reference samples and the first sampling interval;shift=Δ/  (2) where shift represents a starting position of thereference samples.
 12. The method of claim 11, wherein determining thereference sample positions corresponding to the at least one sideaccording to the starting position of the reference samples and thefirst sampling interval comprises: determining the reference samplepositions corresponding to the at least one side to be 2, 6, 10 and 14when the starting position of the reference samples is 2 and thesampling interval is
 4. 13. The method of claim 1, wherein determiningthe reference point from the at least one side and determining thereference sample positions corresponding to the at least one sideaccording to the preset number of samples further comprises:determining, when the length of the at least one side is 8 and thepreset number of samples is 2, the reference sample positionscorresponding to the at least one side to be 2 and 6, or 1 and 5, or 1and 6, or 2 and
 5. 14. The method of claim 1, wherein determining thereference point from the at least one side and determining the referencesample positions corresponding to the at least one side according to thepreset number of samples further comprises; determining the referencepoint from the at least one side, and determining third reference sampleposition and fourth reference sample position near the reference pointas the reference sample positions according to the preset number ofsamples.
 15. The method of claim 1, wherein determining the referencepoint from the at least one side and determining the reference samplepositions corresponding to the at least one side according to the presetnumber of samples further comprises: acquiring, from the referencesamples, remaining reference samples except reference samplescorresponding to a starting position and ending position of the at leastone side; and determining the reference point from the at least oneside, and determining the reference sample positions based on theremaining reference samples and the preset number of samples.
 16. Themethod of claim 1, wherein performing prediction on the coding blockbased on the derived reference samples comprises: determining modelparameters based on the derived reference samples; establishing aprediction model according to the model parameters, the prediction modelbeing configured to represent a prediction relationship between a firstcolour component and a second colour component corresponding to a samplein the coding block; and performing prediction on the coding block basedon the prediction model.
 17. The method of claim 16, wherein determiningthe model parameters based on the derived reference samples comprises:determining, from the derived reference samples, a maximum L_(max) andminimum L_(min) of first colour component neighbouring reference valuesand second colour component neighbouring reference values c_(max) andC_(min) corresponding to reference samples at positions corresponding toL_(max) and L_(min); and calculating model parameters according toL_(max), L_(min),C_(max) and C_(min) by using the formula (3):$\begin{matrix}\left\{ \begin{matrix}{\alpha = \frac{L_{\max} - L_{\min}}{C_{\max} - C_{\min}}} \\{\beta = {L_{\min} - {x \cdot C_{\min}}}}\end{matrix} \right. & (3)\end{matrix}$ where α and β represent model parameters.
 18. A predictiondevice for decoding, comprising a memory and a processor, wherein thememory is configured to store a computer program capable of running inthe processor; and the processor is configured to run the computerprogram to execute a prediction method for decoding, comprising:acquiring reference samples adjacent to at least one side of a codingblock; determining a reference point from the at least one side anddetermining reference sample positions corresponding to the at least oneside according to a preset number of samples, wherein the determiningcomprises: determining the reference point from the at least one side,and determining first reference sample position and second referencesample position near the reference point as the reference samplepositions according to the preset number of samples, wherein thedetermining comprises (1) calculating a first sampling interval based onthe preset number of samples and the length of the at least one side;and (2) determining the reference point from the at least one side, anddetermining the reference sample positions corresponding to the at leastone side according to the first sampling interval; deriving referencesamples corresponding to the reference sample positions from thereference samples; and performing prediction on the coding block basedon the derived reference samples.
 19. A non-transitory computer storagemedium, storing a prediction program for decoding, wherein theprediction program for decoding is executed by at least one processor toimplement a prediction method for decoding, comprising: acquiringreference samples adjacent to at least one side of a coding block;determining a reference point from the at least one side and determiningreference sample positions corresponding to the at least one sideaccording to a preset number of samples, wherein the determiningcomprises: determining the reference point from the at least one side,and determining first reference sample position and second referencesample position near the reference point as the reference samplepositions according to the preset number of samples, wherein thedetermining comprises (1) calculating a first sampling interval based onthe preset number of samples and the length of the at least one side;and (2) determining the reference point from the at least one side, anddetermining the reference sample positions corresponding to the at leastone side according to the first sampling interval; deriving referencesamples corresponding to the reference sample positions from thereference samples; and performing prediction on the coding block basedon the derived reference samples.